package com.orm.analysis.util;

import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Pointcut;

/**
 * Created with IntelliJ IDEA.
 * User: saman
 * Date: 9/25/13
 * Time: 6:05 PM
 * To change this template use File | Settings | File Templates.
 */
@Aspect
public class BusinessProfiler {

//        @Pointcut("execution(* com.orm.analysis.service.*.*(..))")
//        public void businessMethods() { }
//
//        @Around("businessMethods()")
//        public Object profile(ProceedingJoinPoint pjp) throws Throwable {
//                long start = System.currentTimeMillis();
//                System.out.println("Going to call the method.");
//                Object output = pjp.proceed();
//                System.out.println("Method execution completed.");
//                long elapsedTime = System.currentTimeMillis() - start;
//                System.out.println("Method execution time: " + elapsedTime + " milliseconds.");
//                return output;
//        }

}